import request from '@/utils/request'

// 查询用户笔记收藏列表
export function listFavorites(query) {
  return request({
    url: '/know/favorites/list',
    method: 'get',
    params: query
  })
}

// 查询用户笔记收藏详细
export function getFavorites(favoriteId) {
  return request({
    url: '/know/favorites/' + favoriteId,
    method: 'get'
  })
}

// 新增用户笔记收藏
export function addFavorites(data) {
  return request({
    url: '/know/favorites',
    method: 'post',
    data: data
  })
}

// 修改用户笔记收藏
export function updateFavorites(data) {
  return request({
    url: '/know/favorites',
    method: 'put',
    data: data
  })
}

// 删除用户笔记收藏
export function delFavorites(favoriteId) {
  return request({
    url: '/know/favorites/' + favoriteId,
    method: 'delete'
  })
}
